/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.yunhoo.base.db.dao;

import com.yunhoo.base.model.Person;
import java.sql.SQLException;
import java.util.List;

/**
 *
 * @author Administrator
 */
public interface PersonDao {

    public Integer maxCode(String deptCode);
    
    public Integer maxId();

    public void insert(Person per) throws SQLException;

    public void update(Person per) throws SQLException;

    public void updatePWD(Person per) throws SQLException;

    public void delete(Person per) throws SQLException;

    public void deleteById(String cpsn_number) throws SQLException;

    public Person queryById(String cpsn_number) throws SQLException;

    public Person queryByIdAndPwd(Person per) throws SQLException;

    public List<Person> queryListByDept(Person per) throws SQLException;

    public List<Person> queryListByRoleId(String roleId);

    public List<Person> queryAll() throws SQLException;

    public boolean idIsRepeat_add(int id);

    public boolean idIsRepeat_update(Person per);

    public boolean numberIsRepeat(String cpsn_number);

    public boolean nameIsRepeate_add(String cpsn_name);

    public boolean nameIsRepeate_update(Person per);
}
